<template>
  <main class="cars-main">
    <router-view></router-view>
  </main>
</template>

<script setup>
import { ref, getCurrentInstance, onMounted, computed, watch, onBeforeMount } from 'vue'
import config from '../config';
const { proxy } = getCurrentInstance();
let activeIndex = ref('')
const handleSelect = (key, keyPath) => {  
  if(key) return proxy.$router.push(key);
}
onMounted(() => {
  let pathStr = window.location.hash.substring(1);
  if(pathStr.indexOf(":") === -1) {
    activeIndex.value = pathStr
  } else {
    activeIndex.value = pathStr.substring(0, pathStr.indexOf(":", 0))
  }
})
</script>

<style lang="scss" scoped>
  .cars-main {
    height: 100vh;
  }
</style>